/***********************************************
 @Name :        小谭老师
 @Time :        2025-2-22
 @Email :       tan.zhipeng@outlook.com
 @Comment :     功能窗口 智能视觉
 @FileName :    widget_assist_smart_vision.h
 @Version :     1.0
************************************************/


#ifndef WIDGET_FUNCB_SMART_VISION_H
#define WIDGET_FUNCB_SMART_VISION_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QJsonObject>
#include <QNetworkRequest>
#include <QJsonDocument>
#include <QPushButton>
#include <QNetworkReply>
#include <QFileDialog>
#include <QLabel>

typedef enum recognitionType{
    IMG_RECOGNITION,
    ANIMAL_RECOGNITION
}recognitionType;

namespace Ui {
class Widget_funcB_Smart_vision;
}

class Widget_funcB_Smart_vision : public QWidget
{
    Q_OBJECT
    
public:
    explicit Widget_funcB_Smart_vision(QWidget *parent = nullptr);
    ~Widget_funcB_Smart_vision();
    
private slots:
    void handleNetworkReply(QNetworkReply *reply);
    
private:
    Ui::Widget_funcB_Smart_vision *ui;
    
    // 菜单按钮
    QPushButton *imgButton;
    QPushButton *aniButton;
    // 当前识别类型
    recognitionType recType=IMG_RECOGNITION;
    
    QNetworkAccessManager *manager;
    
    // base64字符串
    QString base64Str;
    
    // 图片
    QLabel *img;
    QLabel *res;
    // 按钮
    QPushButton *loadButton;
    QPushButton *uploadButton;
};

#endif // WIDGET_FUNCB_SMART_VISION_H
